﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SportsStore.Web.Models.Product;

namespace SportsStore.Web.Models.CartItem
{
  public class CartItemViewModel
  {
     public CartItemViewModel(SportsStore.Model.CartItem cartItem)
    {
      Id = cartItem.Id;
      CartId = cartItem.CartId;
      ProductId = cartItem.ProductId;
      Quantity = cartItem.Quantity;
      ProductViewModel = new ProductViewModel(cartItem.Product);
    }

    public int Id { get; set; }
    public string CartId { get; set; }
    public int ProductId { get; set; }
    public int Quantity { get; set; }
    public ProductViewModel ProductViewModel { get; set; }
  }
}